﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Evolution.Structure.Globe.Fields;
using System.Diagnostics;
namespace GameProject.Converters
{
    class TypeToTextConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is FieldType)
            {
                switch ((FieldType)value)
                {
                    case FieldType.Water:
                        return "Water";
                    case FieldType.Forest:
                        return "Forest";
                    case FieldType.Grassland:
                        return "Grassland";
                    case FieldType.Mountain:
                        return "Mountain";
                    case FieldType.Empty:
                        return "Empty Field";
                    default:
                        Debug.Assert(false, "Switch wrong!!!");
                        break;
                }
            }
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
